﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ServerExplorer.SharePointConnections.SharepointSiteInfo.Entities
{
    [Serializable]
    public class SiteInfoList
    {
        public List<SiteInfoField> SiteFields;
        public List<SiteInfoEventReceiver> SiteEventReceivers;

        public string IntenalName;

        private string _title;

        public string Title
        {
            get { return _title; }
            set { _title = value; }
        }

        private string _url;

        public string Url
        {
            get { return _url; }
            set
            {
                _url = value;
                string[] aux = _url.Split('/');
                this.IntenalName = aux[aux.Count() - 1];
            }
        }
        private string _itemsCount;

        public string ItemsCount
        {
            get { return _itemsCount; }
            set { _itemsCount = value; }
        }
        private string _description;

        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }

        private string _fieldsCount;

        public string FieldsCount
        {
            get { return _fieldsCount; }
            set { _fieldsCount = value; }
        }

        private string _eventReceiversCount;

        public string EventReceiversCount
        {
            get { return _eventReceiversCount; }
            set { _eventReceiversCount = value; }
        }

        private string _guid;

        public string Guid
        {
            get { return _guid; }
            set { _guid = value; }
        }

        public SiteInfoList()
        {
            SiteFields = new List<SiteInfoField>();
            SiteEventReceivers = new List<SiteInfoEventReceiver>();
        }
    }
}
